﻿namespace PortableTPL
{
    public class CancellationTokenSource
    {
        CancellationToken token = new CancellationToken();

        public bool IsCancellationRequested
        {
            get;
            internal set;
        }

        public CancellationToken Token
        {
            get
            {
                return token;
            }
        }

        public void Cancel()
        {
            IsCancellationRequested = true;

            token.Cancel();
        }
    }
}
